<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    <head>
        <title>美业红</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1">
        <link href="http://cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
        <link href="/public/css/main.css" rel="stylesheet">
        <script type='text/javascript' src='/public/js/jquery-3.1.1.min.js'></script>
        <script type="text/javascript" src='/public/js/jquery.validate.js'></script>
        <script type="text/javascript" src='/public/js/main/main.js'></script>
        <script>
            var _hmt = _hmt || [];
            (function () {
                var hm = document.createElement("script");
                hm.src = "//hm.baidu.com/hm.js?8d43b5b5d798921b66d689f7a792e6e2";
                var s = document.getElementsByTagName("script")[0];
                s.parentNode.insertBefore(hm, s);
            })();
        </script>
        <script type="text/javascript">
            document.domain = '<?php echo _DOMAIN_ALL_;?>';
        </script>
        <link rel="shortcut icon" type="image/ico" href="/favicon.ico">
    </head>
    <body style="background-color: #f4f4f4;">
        <div class="navigation">
            <div class='navlogo'>
            <a href='/'><img class='_navlogo' src="/public/images/logo.png"></a>
            </div>
            <div class='navson'>
                <ul class='fr'>
                <li><a href='/' class='anchor'><b>主页</b></a></li>
                <li><a href="/home/store" class='anchor'><b>店铺</b></a></li>
                <li><a href="/home/barber" class='anchor'><b>成员</b></a></li>
                <li><a href="/home/action" class='anchor'><b>活动</b></a></li>
                <li><a href="/home/order" class='anchor'><b>订单</b></a></li>
                <li><a href="/home/coupon" class='anchor'><b>优惠券</b></a></li>
                <li><a href="/home/goods" class='anchor'><b>商品</b></a></li>
                </ul>
           </div>
            <?php if($_SESSION['id']>0){?>
            <div style="float:right;padding-right:10%">你好:<span id='login_name'></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class='anchor' href='/home/passport/repassword'>修改密码</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class='anchor' href='/home/passport/logout'>退出</a></div>
            <?php }?>
        </div>
        <div style='margin-top:80px;width:100%'>
            <img class='_navlogo' src="/public/images/contentlogo.png" style='width:100%;height:100px'>
        </div>
        <div class='container'>
            <div class='_main'>
            <div class='_line'></div> 
<div class="_contro">
    <?php if($is_admin==1){?>
    <a href="/home/store/configure" class="_a"><font class="_font">配置信息</font></a>&nbsp;&nbsp;&nbsp;
    <a href="/home/store/creates" class="_a"><font class="_font"><b>+</b>添加店铺</font></a>
    <?php }?>
</div>
<div class='_cut'></div>
<?php foreach($store as $k=>$v){?>
<?php if($k%2==0){?>
<div class='row'>
<?php }?>

    <div class='col-sm-2 col-md-6 full'>
        <h2 ><?php echo $v['name'];?></h2>
        <div class="thumbnail" style="margin-bottom:10px"> 
            <div style="width:100%;height:20rem;overflow: hidden;">                
                <img style="width:100%;height:20rem;" src="<?php echo $v['logo'];?>"  id="_banner_"/>
                <br/>
            </div>
            
            <div style='margin-top:1rem;' >
                <span style='float:right;cursor:pointer;' ><a href='/home/store/edit?id=<?php echo $v['id'];?>'>编辑店铺信息</a> </span>
                <span style='float:right;cursor:pointer;color:#337ab7;' onclick='info(<?php echo $v['id'];?>)' >店铺基本信息&nbsp;&nbsp;&nbsp;&nbsp; </span>
            </div>
   
  
<div class='_line'></div> 
<div  id='<?php echo $v['id']; ?>' style='display:none;padding-left:1rem;'  >
    <div style='padding-left:1rem;' >
        <div>地址：<?php echo $v['address'];?></div>
        <div>联系人：<?php echo $v['person_charge']?></div>
        <div>电话：<?php echo $v['tel'];?></div>
    </div> 
    <div  >
        <span  style='float:left;width:40%;margin-top:1rem;'  >
            <div  style='padding-left:1rem;margin-bottom:1rem;' >店铺微信二维码</div>
            <img src="<?php echo $v['code'];?>" style="width:100%;height:175px" id="code"/>
        </span>
        <span style='float:right;width:58%;margin-top:1rem;'  >
            <div  style='margin-bottom:1rem;' >店铺地理位置</div>
            <img style='width:100%;height:175px' src='http://apis.map.qq.com/ws/staticmap/v2/?center=<?php echo $v["latlng"];?>&zoom=13&size=600*300&maptype=roadmap&markers=size:large|color:0x4169e1|label:D|<?php echo $v["latlng"];?>&key=5LTBZ-Z6PC5-WAGIB-QXGAX-JBVBF-XQBTP'/>
        </span>
        
    </div>
    <div class='clear' ></div>
    <div style='float:right;' >
        <span style='float:right;color:#337ab7;cursor:pointer;' onclick='hide(<?php echo $v['id'];?>)' >收起︽&nbsp;&nbsp;&nbsp;&nbsp; </span>
    </div>
</div>
        </div>
    </div>
    <div class='clear' ></div>
<?php if(($k+1)%2==0 || $store[$k+1]['id']<1){?>
</div>
<?php }?>
<?php }?>       

<script type="text/javascript">
    function info(id){
        $('#'+id).show();
        $('#'+id).parent().css('height','530px');
        
    }
    function hide(id){
        $('#'+id).hide();
        $('#'+id).parent().css('height','240px');
    }
</script>
</div>
</div>
<div class='_line'></div>
<div class="newfooter">
    ©2015-2017 All Rights Reserved ( 京ICP备15010043号 ) 
</div>
<div id='mask_layer' style="text-align: center;width:100%;height:100%;overflow:hidden;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#8E8E8E',endColorstr='##8E8E8E');
     background-color:rgba(255, 255, 255, 0.4);position:fixed; _position:absolute; top:0;left:0; z-index:5000;display:none ">
    <div style="padding-top: 20%"><h1><b>loading<span id="_loading"></span></b></h1></div>
</div>
</body>
<script type="text/javascript" src='/public/js/top.js'></script>
</html>